﻿#ifndef SYNTAX_NODE_H
#define SYNTAX_NODE_H

#include <deque>
#include <string>
#include <vector>
#include <iostream>
class SyntaxNode
{
public:
    void push_back_front_ele(std::string &ele);
    void push_back_rear_ele(std::string &ele);
    void push_back_front_ele(SyntaxNode &node);
    void push_child(SyntaxNode &node); // 增加子节点
    void move_child(SyntaxNode &node); // 移动子节点

    friend std::ostream &operator<<(std::ostream &os, const SyntaxNode &n);

private:
    std::deque<std::string> m_self_front_ele;
    std::deque<SyntaxNode> m_child_node;
    std::deque<std::string> m_self_rear_ele;
};

#endif // SYNTAX_NODE_H